<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
 <%@taglib prefix="security" uri="http://www.springframework.org/security/tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
    <title>系统登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link href="<c:out value="${pageContext.request.contextPath}"/>/css/bootstrap.min.css" rel="stylesheet">
    <link href="<c:out value="${pageContext.request.contextPath}"/>/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="<c:out value="${pageContext.request.contextPath}"/>/css/sb-admin.css" rel="stylesheet">
  </head>

  <body>    
    <div class="container">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <div class="login-panel panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">请输入您的用户名和密码</h4>
                    </div>
                    <div class="panel-body">
                        <form role="form" method="POST"   action="<c:url value="/login"/>">
                            <fieldset>
                                <div class="form-group">
                                    <input class="form-control" type="text" name="j_username"  autofocus>
                                </div>
                                <div class="form-group">
                                    <input class="form-control"  type="password" name="j_password">
                                </div>
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" value="Remember Me"  name="_spring_security_remember_me">请记住我
                                    </label>
                                </div>
                               <input type="submit" class="btn btn-primary"  value="登录"></input>
                               <input type="reset" class="btn btn-primary" value="重置"></input>
                            </fieldset>
                        </form>
                    </div>
                     <c:if test="${not empty param.error}">
	 		 			<div class="alert alert-warning">
       						<font color="red">登录失败。<br/></font>
							原因：<c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>
						</div>
					</c:if>
                </div>
            </div>
        </div>
    </div>

    <!-- Core Scripts - Include with every page -->
    <script src="<c:out value="${pageContext.request.contextPath}"/>/js/jquery-1.10.2.js"></script>
    <script src="<c:out value="${pageContext.request.contextPath}"/>/js/bootstrap.min.js"></script>
    <script src="<c:out value="${pageContext.request.contextPath}"/>/js/plugins/metisMenu/jquery.metisMenu.js"></script>

    <!-- SB Admin Scripts - Include with every page -->
    <script src="<c:out value="${pageContext.request.contextPath}"/>/js/sb-admin.js"></script>
  </body>
</html>

